{% extends 'base.html' %}
{% block title %}{{ year }}年{{ month }}月的文章列表{% endblock %}
{% block left %}

    <div id="main">
        <style>
            /* 主要容器样式 */
            #main {
                max-width: 800px;
                margin: 0 auto;
                padding: 20px;
            }
            /* 文章头部样式 */
            .archive-article-header {
                display: flex;
                flex-direction: column;
            }

            /* 日期样式 */
            .archive-article-date {
                font-size: 14px;
                color: #666;
                margin-bottom: 5px;
            }

            /* 标题样式 */
            .archive-article-title {
                font-size: 18px;
                color: #333;
                text-decoration: none;
                transition: color 0.3s;
            }

            .archive-article-title:hover {
                color: #007bff;
            }

        </style>


        <div class="archives">
            {% for article in c_articles %}
                <article class="archive-article archive-type-post">
                    <div class="archive-article-inner">
                        <header class="archive-article-header">
                            <a href="#" class="archive-article-date">
                                <time>{{ article.create_time|date:'Y-m-d' }}</time>
                            </a>
                            <h1 itemprop="name">
                                <a class="archive-article-title" target="_blank" href="{% url 'article_detail' article.id %}">{{ article.title }}</a>
                            </h1>
                        </header>
                    </div>
                </article>
            {% empty %}
                <p>无记录</p>
            {% endfor %}
        </div>
    </div>

{% endblock %}
